﻿using System;
using System.Collections.Generic;
using System.Text;

namespace IntelligentGateway.Model.Attribute
{
        public class ForeignRelAttribute : System.Attribute
        {
            string _strRelColumn = string.Empty;
            string _strRelTable = string.Empty;
            string _strDisplayColumn = string.Empty;
            string _strJoinTable = string.Empty;
            string _strJoinType = string.Empty;
            public ForeignRelAttribute(string strRelTable, string strRelColumn, string strDisplayColumn, string strJoinTable = "", string strJoinType = "")
            {
                this._strRelColumn = strRelColumn;
                this._strRelTable = strRelTable;
                this._strDisplayColumn = strDisplayColumn;
                this._strJoinTable = strJoinTable;
                this._strJoinType = strJoinType;
            }

            public string RelColumn
            {
                get { return _strRelColumn; }
            }
            public string RelTable//表别名
            {
                get { return _strRelTable; }
            }
            public string DisplayColumn
            {
                get { return _strDisplayColumn; }
            }
            public string JoinTable
            {
                get { return _strJoinTable; }
            }
            public string JoinType { get { return _strJoinType; } }
        }
        public class FSelectAttribute : System.Attribute
        {
            string _tableName = string.Empty;
            public FSelectAttribute(string tableName)
            {
                this._tableName = tableName;
            }
            public string TableName
            {
                get
                {
                    return _tableName;
                }
            }
        }
        public class IgnoreAttribute : System.Attribute
        {

            public IgnoreAttribute()
            {
            }

        }
        public class NoSelectAttribute : System.Attribute
        {

            public NoSelectAttribute()
            {
            }

        }
        public class ExcelColumnAttribute : System.Attribute
        {
            int column = 0;
            public int Cloumn { get { return column; } set { column = value; } }
            public ExcelColumnAttribute(int Column)
            {
                this.column = Column;
            }
        }  
}
